"""
EmailQA_SOP Repository Interface
"""

from abc import ABC, abstractmethod
from typing import List, Optional
from .emailqa_sop import EmailQA_SOP

class EmailQA_SOPRepository(ABC):
    """Abstract repository for EmailQA_SOP operations"""
    
    @abstractmethod
    def create(self, emailqa_sop: EmailQA_SOP) -> EmailQA_SOP:
        """Create a new EmailQA_SOP association"""
        pass
    
    @abstractmethod
    def get_by_id(self, association_id: int) -> Optional[EmailQA_SOP]:
        """Get EmailQA_SOP association by ID"""
        pass
    
    @abstractmethod
    def get_all(self) -> List[EmailQA_SOP]:
        """Get all EmailQA_SOP associations"""
        pass
    
    @abstractmethod
    def update(self, emailqa_sop: EmailQA_SOP) -> EmailQA_SOP:
        """Update an existing EmailQA_SOP association"""
        pass
    
    @abstractmethod
    def delete(self, association_id: int) -> bool:
        """Delete an EmailQA_SOP association by ID"""
        pass
    
    @abstractmethod
    def get_by_emailqa_id(self, emailqa_id: int) -> List[EmailQA_SOP]:
        """Get all SOP associations for a specific EmailQA"""
        pass
    
    @abstractmethod
    def get_by_sop_id(self, sop_id: int) -> List[EmailQA_SOP]:
        """Get all EmailQA associations for a specific SOP"""
        pass
    
    @abstractmethod
    def get_sops_with_emailqa_by_subject(self, subject: str) -> List[dict]:
        """Get SOPs with associated EmailQA data by SOP subject"""
        pass
    
    @abstractmethod
    def association_exists(self, emailqa_id: int, sop_id: int) -> bool:
        """Check if an association already exists"""
        pass